﻿/*----------------------------------------------------------------
//  <copyright file="WeChatErrorDto.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2022-11-15 14:41</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.Authentication.OAuth2.WeChat.Dtos
{
    #region "错误信息Dto"
    /// <summary>
    /// 错误信息Dto
    /// </summary>
    public class WeChatErrorDto
    {
        #region "属性"
        #region "获取或设置 错误代码"
        /// <summary>
        /// 获取或设置 错误代码
        /// </summary>
        public string ErrCode { get; set; }
        #endregion
        #region "获取或设置 错误消息"
        /// <summary>
        /// 获取或设置 错误消息
        /// </summary>
        public string ErrMsg { get; set; }
        #endregion

        #endregion

        #region "构造函数"
        #region "初始化一个错误信息Dto的新实例"
        /// <summary>
        /// 初始化一个错误信息Dto的新实例
        /// </summary>
        public WeChatErrorDto()
        { }
        #endregion
        #region "初始化一个错误信息Dto的新实例"
        /// <summary>
        /// 初始化一个错误信息Dto的新实例
        /// </summary>
        /// <param name="errCode"></param>
        /// <param name="errMsg"></param>
        public WeChatErrorDto(string errCode,string errMsg)
        {
            ErrCode = errCode;
            ErrMsg = errMsg;
        }
        #endregion
        #region "初始化一个错误信息Dto的新实例"
        /// <summary>
        /// 初始化一个错误信息Dto的新实例
        /// </summary>
        /// <param name="jObject"></param>
        public WeChatErrorDto(JObject jObject)
        {
            ErrCode = jObject?.Value<string>("errcode");
            ErrMsg = jObject?.Value<string>("errmsg");
        }
        #endregion

        #endregion

    }
    #endregion

}
